<?php
/**
 * Created by PhpStorm.
 * User: yshang15
 * Date: 16/4/30
 * Time: 上午11:30
 */
$this->title = '甲子与年份的互相对映';
?>
<div class="row">
    <div class="col-xs-12">
        <div class="col-xs-4 text-center table-bordered tiangan" style="height:40px;" tiangan="<?php  echo $tiangan[$location[0]]['year'];  ?>"><?php  echo $tiangan[$location[0]]['jiazi'];  ?></div>
        <div class="col-xs-4 text-center table-bordered tiangan" style="height:40px;" tiangan="<?php  echo $tiangan[$location[1]]['year'];  ?>"><?php  echo $tiangan[$location[1]]['jiazi'];  ?></div>
        <div class="col-xs-4 text-center table-bordered tiangan" style="height:40px;" tiangan="<?php  echo $tiangan[$location[2]]['year'];  ?>"><?php  echo $tiangan[$location[2]]['jiazi'];  ?></div>
    </div>
</div>
<div class="row">
    <div class="col-xs-12">
        <div class="col-xs-4 text-center table-bordered tiangan" style="height:40px;" tiangan="<?php  echo $tiangan[$location[3]]['year'];  ?>"><?php  echo $tiangan[$location[3]]['jiazi'];  ?></div>
        <div class="col-xs-4 text-center table-bordered tiangan" style="height:40px;" tiangan="<?php  echo $tiangan[$location[4]]['year'];  ?>"><?php  echo $tiangan[$location[4]]['jiazi'];  ?></div>
        <div class="col-xs-4 text-center table-bordered tiangan" style="height:40px;" tiangan="<?php  echo $tiangan[$location[5]]['year'];  ?>"><?php  echo $tiangan[$location[5]]['jiazi'];  ?></div>
    </div>
</div>
<div class="row">
    <div class="col-xs-12">
        <div class="col-xs-4 text-center table-bordered tiangan" style="height:40px;" tiangan="<?php  echo $tiangan[$location[6]]['year'];  ?>"><?php  echo $tiangan[$location[6]]['jiazi'];  ?></div>
        <div class="col-xs-4 text-center table-bordered tiangan" style="height:40px;" tiangan="<?php  echo $tiangan[$location[7]]['year'];  ?>"><?php  echo $tiangan[$location[7]]['jiazi'];  ?></div>
        <div class="col-xs-4 text-center table-bordered tiangan" style="height:40px;" tiangan="<?php  echo $tiangan[$location[8]]['year'];  ?>"><?php  echo $tiangan[$location[8]]['jiazi'];  ?></div>
    </div>
</div>
<br />
<br />
<a href="/bazi/jiazi/index">出题</a>
<br />
<br />
<a href="/bazi/jiazi/year">年份=>甲子</a>
<script language="javascript">
    $(".tiangan").click(function() {
        var num = $(this).attr("tiangan");
        alert(num)
    });
</script>